package com.qk.management.exception;

import com.qk.common.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@Slf4j
@RestControllerAdvice
public class MyGlobalExceptionHandler {
    @ExceptionHandler(value = Exception.class)
    public Result handlerException(Exception e){
       log.error("服务器异常:{}",e.getMessage());
        return Result.error("您的网络有问题，请稍后重试");
    }


}
